<template>
	<view class="bgFF">
		<view class="bgIndex ">




		</view>
		<view class="certificationInformation">
			<view class="padding-top_15rpx" style="margin-left:212rpx; ">

				<!-- <image @click="clk(0)" class="avatar" style="border-radius: 50%;" :src="urls[0]" mode="">
            
            	</image>
            	<avatar style="position: absolute;" @upload="myUpload" ref="avatar"></avatar> -->
				<image class="avatar" style="border-radius: 50%;" :src="form.avatar" mode=""></image>

				请上传真实资料，可提升关注度
			</view>

			<!-- <view class="padding-top_15rpx" style="margin-left:212rpx; ">

				<image @click="clk(0)" class="avatar" style="border-radius: 50%;" :src="urls[0]" mode="">

				</image>
				<avatar style="position: absolute;" @upload="myUpload" ref="avatar"></avatar>


				请上传真实资料，可提升关注度
			</view> -->
			<view class="margin-bottom_40rpx" style="margin-top: 70rpx;">
				<pro-gress :list="Steps" :StepInfo='StepInfo'></pro-gress>
			</view>
			<!-- 认证基本资料 -->
			<view class="" v-show="step==1">
				<view class="borderTwo" style="padding: 40rpx 40rpx;">
					<view class="  flex-wujustify higeys">
						<view class=" " style="width:180rpx;">
							昵称
						</view>
						<view class="">
							<input class="uni-input" type="text" v-model="form.nickname" placeholder="请输入昵称/称呼" />
						</view>


					</view>



					<view class=" myNmae flex-between higeys">
						<view class="flex-wujustify">
							<view style="width:180rpx;">
								手机号
							</view>
							<view class="" v-if="userInfo.phone">
								<input class="uni-input" maxlength="11" name="phone" type="text"
									v-model="form.phoneNumber" :disabled="replace?false:true" placeholder="请输入手机号" />
							</view>
							<view class="" v-if="!userInfo.phone">
								<input class="uni-input" maxlength="11" name="phone" type="text"
									v-model="form.phoneNumber" placeholder="请输入手机号" />
							</view>
						</view>
						<view style="color: #6C02FA;width: 100rpx;" class="" v-if="userInfo.phone" @click="replaceFn()">
							<text>{{replace?'不更换 ':'更换'}}</text>
						</view>


					</view>
					<view class=" myNmae higeys flex-between margin-top_40rpx" v-if="(!userInfo.phone)||replace">
						<view class=" ">
							验证码
						</view>
						<view class=" flex  ">

							<input style="margin-left: 60rpx;" v-model="form.sms_code" type="number" maxlength="11"
								name="phone" placeholder="请输入验证码" />


						</view>
						<view class="verificationCode" @click="getVerificationCode()">
							{{ count ? count + '秒' : '获取验证码' }}
						</view>

					</view>
					<view class=" myNmae flex-wujustify margin-top_40rpx" v-if="!Number(isOpen_idCard_authentication)">
						<view class=" " style="width:166rpx;">
							年龄
						</view>
						<view class="">
							<input class="uni-input" type="text" maxlength="2" v-model="form.age" placeholder="请输入年龄" />
						</view>


					</view>
					<view class=" margin-top_40rpx">
						<view class="margin-bottom_30rpx">
							语音介绍
						</view>
						<view class="voiceIntroduction flex" @click="voiceRecordingFn()">
							{{form.speech?'✔ 已经添加语音':'+ 添加语音'}}
						</view>


					</view>
					<view class=" myNmae flex-between margin-top_60rpx">
						<view class=" ">
							个人介绍
						</view>
						<view class="">
							<input class="uni-input" type="text" v-model="form.introduce" placeholder="介绍一下自己吧" />
						</view>


					</view>
				</view>
				<view class="borderTwo" style="padding: 35rpx 40rpx;">
					<view class="flex-between margin-top_20rpx" v-if="!Number(isOpen_idCard_authentication)">
						<view class="">
							你的性别
						</view>
						<radio-group v-model="form.sex" name="apply" @change="radioChange">

							<label class="m-right10">
								<radio :checked="form.sex ==1" class="min-radio" value="1" color="#67C23A" />
								<text>男</text>
							</label>
							<label>
								<radio :checked="form.sex ==2" class="min-radio" value="2" color="#67C23A" />
								<text>女</text>
							</label>
						</radio-group>
					</view>

					<!-- <view class="higeys margin-top_20rpx">
						<picker mode="date" :value="date" :fields="currentTimeFn(currentTime)" :start="startDate"
							:end="endDate" @change="bindDateChange">
							<view class="  flex-between">

								<view class="flex-wujustify myNmae">

									<view style="width:180rpx;">
										生日
									</view>

									<view class="flex-align-center-justify-start  ">
										<view class="" v-if="yeartime&&monthtime&&daytime">
											{{ yeartime }}
											<text>-</text>
											{{ monthtime }}
											<text>-</text>
											{{ daytime }}
											
										</view>
										<view style="color: #868080;" class="" v-else>
											请选择出生日期

										</view>

									</view>

								</view>
								<uni-icons color="#999999" type="right" size="20"></uni-icons>

							</view>
						</picker>
					</view> -->
					<view class=" myNmae flex-between margin-top_40rpx">
						<view class="flex-between" style="width: 500rpx;">
							<view class=" ">
                                从事的行业
							</view>
							<view class="">
								<input class="uni-inputs" type="text" v-model="form.trade" placeholder="请输入从事的行业" />
							</view>
						</view>
						<!-- <uni-icons color="#999999" type="right" size="20"></uni-icons> -->
					
					</view>
					<view class=" myNmae flex-between margin-top_40rpx">
						<view class="flex-between" style="width: 500rpx;">
							<view class=" ">
					            体重
							</view>
							<view class="">
								<input class="uni-inputs" type="text" v-model="form.weight" placeholder="请输入体重(kg)" />
							</view>
						</view>
						<!-- <uni-icons color="#999999" type="right" size="20"></uni-icons> -->
					
					</view>

					<view class=" myNmae flex-between margin-top_40rpx">
						<view class="flex-between" style="width: 500rpx;">
							<view class=" ">
								当前身高
							</view>
							<view class="">
								<input class="uni-inputs" type="text" v-model="form.height" placeholder="请输入身高" />
							</view>
						</view>
						<!-- <uni-icons color="#999999" type="right" size="20"></uni-icons> -->

					</view>

				</view>
				<view class="borderTwo" style="padding: 35rpx 40rpx;">
					<view class=" myNmae flex-between ">
						<view class="flex-between " style="width: 500rpx;">
							<view class=" ">
								所在学校
							</view>
							<view class="">
								<input class="uni-inputs" type="text" v-model="form.school" placeholder="请输入你毕业/所在学校" />
							</view>
						</view>
						<!-- <uni-icons color="#999999" type="right" size="20"></uni-icons> -->


					</view>

					<!-- <view class=" myNmae flex-between margin-top_60rpx">
						<view class="flex-between" style="width: 500rpx;">
							<view class=" ">
								IP归属地
							</view>
							<view class="">
								<input class="uni-inputs" type="text" v-model="form.title" placeholder="请选择当前所在位置" />
							</view>
						</view>
						<uni-icons color="#999999" type="right" size="20"></uni-icons>

					</view>
					<view class=" myNmae flex-between margin-top_60rpx">
						<view class="flex-between" style="width: 500rpx;">
							<view class=" ">
								当前地区
							</view>
							<view class="">
								<input class="uni-inputs" type="text" v-model="form.title" placeholder="点击获取位置信息" />
							</view>
						</view>
						<uni-icons color="#999999" type="right" size="20"></uni-icons>

					</view> -->
					<view class=" margin-top_40rpx ">
						<view class="margin-bottom_30rpx">
							生活照片
						</view>
						<view class="">
							<sunui-upimg1 class="margin-top_20rpx" :border="'1px dashed #bfbfbf'"
								:formData="imgFormData" :storageMode="storageMode" :header="header"
								:size="['200rpx', '200rpx']" btnName="上传生活照片" :uploadServerUrl="upPicUrl"
								ref="selectimgandupload" @uploaded="imgLoaded" @change="imgsChange"
								:maxFileNumber="5"><template v-slot:icon>
									<uni-icons type="camera-filled" color="#1890FF" size="40"></uni-icons>
								</template></sunui-upimg1>
						</view>


					</view>
					<!-- 	<view class=" margin-top_40rpx ">
						<view class="margin-bottom_30rpx">
							封面图
						</view>
						<view class="">
							<sunui-upimg1 class="margin-top_20rpx" :border="'1px dashed #bfbfbf'"
								:formData="imgFormData3" :storageMode="storageMode" :header="header"
								:size="['200rpx', '200rpx']" btnName="上传生活照片" :uploadServerUrl="upPicUrl3"
								ref="selectimgandupload3" @uploaded="imgLoaded3" @change="imgsChange3"
								:maxFileNumber="1"><template v-slot:icon>
									<uni-icons type="camera-filled" color="#1890FF" size="40"></uni-icons>
								</template></sunui-upimg1>
						</view>


					</view> -->
					<!-- 	<view class=" margin-top_40rpx ">
						<view class="margin-bottom_30rpx">
							背景详情
						</view>
						<view class="">
							<sunui-upimg1 class="margin-top_20rpx" :border="'1px dashed #bfbfbf'"
								:formData="imgFormData4" :storageMode="storageMode" :header="header"
								:size="['200rpx', '200rpx']" btnName="上传生活照片" :uploadServerUrl="upPicUrl4"
								ref="selectimgandupload4" @uploaded="imgLoaded4" @change="imgsChange4"
								:maxFileNumber="5"><template v-slot:icon>
									<uni-icons type="camera-filled" color="#1890FF" size="40"></uni-icons>
								</template></sunui-upimg1>
						</view>


					</view> -->
					<view class=" margin-top_40rpx">
						<view class="margin-bottom_30rpx">
							个性标签
						</view>
						<view v-if="!form.label" class="voiceIntroduction flex" @click="AddTagsFn()">
							+ 添加标签
						</view>
						<view v-if="form.label" class="voiceIntroduction flex" @click="AddTagsFn(form.label)">
							✔ 已添加
						</view>

					</view>
					<view class="next flex" @click="nextFn(2)">
						下一步
					</view>

				</view>
			</view>
			<!-- 上传身份证 -->
			<view class=" " v-show="step==2" style="padding: 40rpx 40rpx;">
				<view class=" myNmae flex-between ">
					<view class="flex-between " style="width:100%;">
						<view class=" ">
							工资收入
						</view>
						<picker mode="selector" @change='region' :range="regionList" :range-key="'text'">
							<view class="flex">
								<view style="color: #999999;">{{selsectRegion}}</view>
								<uni-icons color="#999999" type="right" size="18"></uni-icons>
							</view>
						</picker>
					</view>
					<!-- <uni-icons color="#999999" type="right" size="20"></uni-icons> -->


				</view>
				<view class=" myNmae flex-between margin-top_60rpx">
					<view class="flex-between " style="width:100%;">
						<view class=" ">
							独生子女
						</view>
						<picker mode="selector" @change='onlyChildFn' :range="onlyChildList" :range-key="'text'">
							<view class="flex">
								<view style="color: #999999;">{{onlyChild}}</view>
								<uni-icons color="#999999" type="right" size="18"></uni-icons>
							</view>
						</picker>
					</view>
					<!-- <uni-icons color="#999999" type="right" size="20"></uni-icons> -->


				</view>
				<view class=" myNmae flex-between margin-top_60rpx">
					<view class="flex-between " style="width:100%;">
						<view class=" ">
							是否有车
						</view>
						<picker mode="selector" @change='onlyCarFn' :range="onlyCarList" :range-key="'text'">
							<view class="flex">
								<view style="color: #999999;">{{onlyCar}}</view>
								<uni-icons color="#999999" type="right" size="18"></uni-icons>
							</view>
						</picker>
					</view>
					<!-- <uni-icons color="#999999" type="right" size="20"></uni-icons> -->


				</view>
				<view class=" myNmae flex-between margin-top_60rpx">
					<view class="flex-between " style="width:100%;">
						<view class=" ">
							是否有房
						</view>
						<picker mode="selector" @change='onlyHouseFn' :range="onlyHouseList" :range-key="'text'">
							<view class="flex">
								<view style="color: #999999;">{{onlyHouse}}</view>
								<uni-icons color="#999999" type="right" size="18"></uni-icons>
							</view>
						</picker>
					</view>
					<!-- <uni-icons color="#999999" type="right" size="20"></uni-icons> -->


				</view>
				<view class=" myNmae flex-between margin-top_60rpx">
					<view class="flex-between " style="width:100%;">
						<view class=" ">
							最低学历
						</view>
						<picker mode="selector" @change='me_educationeFn' :range="me_educationList" :range-key="'text'">
							<view class="flex">
								<view style="color: #999999;">{{me_education}}</view>
								<uni-icons color="#999999" type="right" size="18"></uni-icons>
							</view>
						</picker>
					</view>
					
				
				
				</view>
				<view class=" myNmae flex-between margin-top_60rpx">
					<view class="flex-between " style="width:100%;">
						<view class=" ">
							婚姻状况
						</view>
						<picker mode="selector" @change='maritalStatusFn' :range="maritalStatusList"
							:range-key="'text'">
							<view class="flex">
								<view style="color: #999999;">{{maritalStatus}}</view>
								<uni-icons color="#999999" type="right" size="18"></uni-icons>
							</view>
						</picker>
					</view>
					<!-- <uni-icons color="#999999" type="right" size="20"></uni-icons> -->


				</view>
				<view class=" myNmae flex-between margin-top_60rpx">
					<view class="flex-between " style="width:100%;">
						<view class=" ">
							何时结婚
						</view>
						<picker mode="selector" @change='whenMarriedFn' :range="whenMarriedList" :range-key="'text'">
							<view class="flex">
								<view style="color: #999999;">{{whenMarried}}</view>
								<uni-icons color="#999999" type="right" size="18"></uni-icons>
							</view>
						</picker>
					</view>
					<!-- <uni-icons color="#999999" type="right" size="20"></uni-icons> -->


				</view>
				<view class=" myNmae flex-between margin-top_60rpx">
					<view class="flex-between " style="width:100%;">
						<view class=" ">
							民族
						</view>
						<picker mode="selector" @change='ethnicFn' :range="ethnicList" :range-key="'text'">
							<view class="flex">
								<view style="color: #999999;">{{ethnic}}</view>
								<uni-icons color="#999999" type="right" size="18"></uni-icons>
							</view>
						</picker>
					</view>
					<!-- <uni-icons color="#999999" type="right" size="20"></uni-icons> -->


				</view>
				<view class="flex margin-top_40rpx">
					<view class="pre flex " style="margin: 0 20rpx;" @click="preFn(1)">
						上一步
					</view>
					<view class="next flex " style="margin: 0 20rpx;width: 100%;" @click="nextFn(3)">
						下一步
					</view>
				</view>
				<view style="height: 30rpx;" class="">

				</view>

			</view>
			<!-- 开始认证 -->
			<view class="" v-if="step==3" style="padding: 40rpx 40rpx;">
				<view class=" myNmae flex-between ">
					<view class="flex-between " style="width:100%;">
						<view class=" ">
							年龄范围
						</view>
						<picker mode="selector" @change='ageRangeFn' :range="ageRangeList" :range-key="'text'">
							<view class="flex">
								<view style="color: #999999;">{{ageRange}}</view>
								<uni-icons color="#999999" type="right" size="18"></uni-icons>
							</view>
						</picker>
					</view>
					<!-- <uni-icons color="#999999" type="right" size="20"></uni-icons> -->


				</view>
				<view class=" myNmae flex-between margin-top_60rpx">
					<view class="flex-between " style="width:100%;">
						<view class=" ">
							最低身高
						</view>
						<picker mode="selector" @change='heightFn' :range="heightList" :range-key="'text'">
							<view class="flex">
								<view style="color: #999999;">{{heightRange}}</view>
								<uni-icons color="#999999" type="right" size="18"></uni-icons>
							</view>
						</picker>
					</view>
					<!-- <uni-icons color="#999999" type="right" size="20"></uni-icons> -->


				</view>
				<view class=" myNmae flex-between margin-top_60rpx">
					<view class="flex-between " style="width:100%;">
						<view class=" ">
							收入要求
						</view>
						<picker mode="selector" @change='taRegionFn' :range="taRegionList" :range-key="'text'">
							<view class="flex">
								<view style="color: #999999;">{{taRegion}}</view>
								<uni-icons color="#999999" type="right" size="18"></uni-icons>
							</view>
						</picker>
					</view>
					<!-- <uni-icons color="#999999" type="right" size="20"></uni-icons> -->


				</view>
				<view class=" myNmae flex-between margin-top_60rpx">
					<view class="flex-between " style="width:100%;">
						<view class=" ">
							最低学历
						</view>
						<picker mode="selector" @change='educationeFn' :range="educationList" :range-key="'text'">
							<view class="flex">
								<view style="color: #999999;">{{education}}</view>
								<uni-icons color="#999999" type="right" size="18"></uni-icons>
							</view>
						</picker>
					</view>
					


				</view>
			
				<view class=" myNmae flex-between margin-top_60rpx">
					<view class="flex-between " style="width:100%;">
						<view class=" ">
							
							婚况要求
						</view>
						<picker mode="selector" @change='taMaritalStatusFn' :range="taMaritalStatusList" :range-key="'text'">
							<view class="flex">
								<view style="color: #999999;">{{taMaritalStatus}}</view>
								<uni-icons color="#999999" type="right" size="18"></uni-icons>
							</view>
						</picker>
					</view>
					<!-- <uni-icons color="#999999" type="right" size="20"></uni-icons> -->


				</view>
				<view class=" myNmae flex-between margin-top_60rpx">
					<view class="flex-between " style="width:100%;">
						<view class=" ">
							是否接受小孩
						</view>
						<picker mode="selector" @change='taIsHaveChildFn' :range="taIsHaveChildList" :range-key="'text'">
							<view class="flex">
								<view style="color: #999999;">{{taIsHaveChild}}</view>
								<uni-icons color="#999999" type="right" size="18"></uni-icons>
							</view>
						</picker>
					</view>
					<!-- <uni-icons color="#999999" type="right" size="20"></uni-icons> -->


				</view>
				<view class=" myNmae flex-between margin-top_60rpx">
					<view class="flex-between " style="width:100%;">
						<view class=" ">
							住房要求
						</view>
						<picker mode="selector" @change='taOnlyHouseFn' :range="taOnlyHouseList" :range-key="'text'">
							<view class="flex">
								<view style="color: #999999;">{{taOnlyHouse}}</view>
								<uni-icons color="#999999" type="right" size="18"></uni-icons>
							</view>
						</picker>
					</view>
					<!-- <uni-icons color="#999999" type="right" size="20"></uni-icons> -->
				
				
				</view>
				<view class=" margin-top_60rpx" style="background-color: #fff;">
					<view class="personalTags">
						<view>
							<view class="font-weight_bold">
								需求标签
							</view>
							<view class="tag_container">
								<zy-tag ref="zyAddTag" addible closable @delete="deleteTag(item)"
									v-for="(item, index) in tagAddList" :text="item"></zy-tag>
								<view class="zy_tag_add"><text class="zy_tag_add_input" @click="addTag()">+ 自定义</text></view>
							</view>
						</view>
					</view>
				
				</view>
				<view class="flex margin-top_40rpx">
					<view class="pre flex " style="margin: 0 20rpx;" @click="preFn(2)">
						上一步
					</view>
					<view class="next flex " v-if="!isCertified" style="margin: 0 20rpx;width: 100%;"
						@click="nextFn(4)">
						提交
					</view>
					<view class="next flex " v-if="isCertified" style="margin: 0 20rpx;width: 100%;" @click="nextFn(4)">
						认证完成
					</view>
				</view>
			</view>
			<!-- 认证完成 -->
			<view class="" v-if="step==4">
				<view class="flex-column margin-bottom_20rpx">
					<image :src="toExamine" mode="aspectFit"></image>
					<view class="font-weight_bold font40 margin-bottom_10rpx">
						{{userInfoObject.is_authentication==0?'认证完成待审核状态':userInfoObject.is_authentication==1?'审核中请耐心等待':userInfoObject.is_authentication==2?'恭喜你认证成功':"认证失败"}}
					</view>
					<view class="">
						<text
							style="color: #999999;">{{userInfoObject.is_authentication==0?'专属更多安全保障，更多优惠权益':userInfoObject.is_authentication==1?'请耐心等待，预计3-15个工作日审核完成':userInfoObject.is_authentication==2?'恭喜你认证成功，请开启新的世界把':userInfoObject.remark}}</text>
					</view>
				</view>

				<view class="flex">
					<view v-if="userInfoObject.is_authentication==3" class="pre flex " style="margin: 0 20rpx;"
						@click="preFn(1,'reCertification')">
						重新认证
					</view>
					<view v-if="userInfoObject.is_authentication==2" class="pre flex " style="margin: 0 20rpx;"
						@click="preFn(1,'reCertification')">
						重新编辑
					</view>
					<view class="next flex " style="margin: 0 20rpx;width: 100%;" @click="returnHomepageFn()">
						返回首页
					</view>
				</view>

			</view>
		</view>
		<!-- 添加标签 弹出框 -->
		<sunui-popup ref="pop">
			<template v-slot:content>
		
				<view class="v-pop-cls flex-column">
					<view class="text-align_right " style="width: 90%;">
		
		
						<uni-icons type="closeempty" @click="closeTag()" size="20"></uni-icons>
		
					</view>
					<text class="margin-right_50rpx">添加标签</text>
					<input placeholder="请输入2到6个字标签" v-model="singleLabel" />
					<view class="flex add" @click="singleLabelClick()">添加</view>
				</view>
			</template>
		</sunui-popup>
		<sunui-popup ref="modifyEmployeeInfo">
			<template v-slot:content>

				<view class="moreActiveButton" style="z-index: 9999;position: relative;">
					<soundRecording @confirm='confirm' @cancel="cancel"></soundRecording>
				</view>

			</template>
		</sunui-popup>

	</view>
</template>

<script>
	import bowCamera from '@/uni_modules/bow-camera/components/bow-camera/bow-camera.vue';
	import soundRecording from '@/components/sound-recording/sound-recording.vue'
	import avatar from "@/components/yq-avatar/yq-avatar.vue";
	import proGress from '@/components/progress3/progress.vue'
	import zyTag from '@/uni_modules/zy-tag/components/zy-tag/zy-tag.vue'
	export default {
		components: {
			proGress,
			avatar,
			soundRecording,
			bowCamera,
			zyTag
		},
		data() {
			return {
				tagAddList:[],
				singleLabel:'',
				selsectRegion: '请选择工资收入',
				onlyChild: '是否是独生子女',
				onlyCar: '是否有车',
				onlyHouse: '是否有房',
				maritalStatus: '请选择婚姻状态',
				taMaritalStatus:'请选择婚姻状态',
				whenMarried: '请选择何时结婚',
				ethnic: '请选择民族',
				ageRange: '请选择年龄范围',
				heightRange:"请选择最低身高",
				education:"请选择学历",
				taRegion:'请选择收入范围',
				taIsHaveChild:'是否接受小孩',
				taOnlyHouse:'请选择住房要求',
				me_education:'请选择学历',
				
                taRegionList: [{
                	text: '2500-5000',
                	value: '1'
                
                }, {
                	text: '5000-8000',
                	value: '2'
                
                }, {
                	text: '8000-10000',
                	value: '3'
                
                }, {
                	text: '10000-15000',
                	value: '4'
                
                }, {
                	text: '15000以上',
                	value: '5'
                
                }, ],
				regionList: [{
					text: '2500-5000',
					value: '1'

				}, {
					text: '5000-8000',
					value: '2'

				}, {
					text: '8000-10000',
					value: '3'

				}, {
					text: '10000-15000',
					value: '4'

				}, {
					text: '15000以上',
					value: '5'

				}, ],

				onlyChildList: [{
					text: '是',
					value: '1'

				}, {
					text: '否',
					value: '2'

				}],
				taIsHaveChildList:[{
					text: '是',
					value: '1'

				}, {
					text: '否',
					value: '2'

				}],
				onlyCarList: [{
					text: '已购车',
					value: '1'

				}, {
					text: '未购车',
					value: '2'

				}, {
					text: '婚后购车',
					value: '3'

				}],
				onlyHouseList: [{
					text: '已购房',
					value: '1'

				}, {
					text: '未购房',
					value: '2'

				}, {
					text: '婚后购房',
					value: '3'

				}],
				taOnlyHouseList:[{
					text: '不限',
					value: '1'

				}, {
					text: '和家人同居',
					value: '2'

				}, {
					text: '已购房',
					value: '3'

				},{
					text: '租房',
					value: '4'

				},{
					text: '婚后购房',
					value: '5'

				}],
				maritalStatusList: [{
					text: '未婚',
					value: '1'

				}, {
					text: '已婚',
					value: '2'

				},{
					text: '离异',
					value: '3'

				}],
				taMaritalStatusList: [{
					text: '未婚',
					value: '1'

				}, {
					text: '已婚',
					value: '2'

				},{
					text: '离异',
					value: '3'

				}],
				whenMarriedList: [{
					text: '时机成熟结婚',
					value: '1'

				}, {
					text: '随时结婚',
					value: '2'

				}, {
					text: '一年内结婚',
					value: '3'

				}],
				ageRangeList:[{
					text: '不限',
					value: '1'

				}, {
					text: '18-22岁',
					value: '2'

				}, {
					text: '22-25岁',
					value: '3'

				},
				{
					text: '25-28岁',
					value: '4'
				
				},{
					text: '28-30岁',
					value: '5'
				
				},{
					text: '30-34岁',
					value: '6'
				
				},{
					text: '34-40岁',
					value: '7'
				
				},{
					text: '40-45岁',
					value: '8'
				
				},{
					text: '45岁以上',
					value: '9'
				
				}],
				heightList:[{
					text: '不限',
					value: '1'
				
				},{
					text: '150-155cm',
					value: '2'
				
				},{
					text: '155-160cm',
					value: '2'
				
				},{
					text: '160-165cm',
					value: '3'
				
				},{
					text: '165-170cm',
					value: '4'
				
				},{
					text: '170-175cm',
					value: '5'
				
				},{
					text: '175cm以上',
					value: '6'
				
				}],
				me_educationList:[{
					text: '不限',
					value: '1'
				
				},{
					text: '高中以上',
					value: '2'
				
				},{
					text: '大专以上',
					value: '3'
				
				},{
					text: '本科以上',
					value: '4'
				
				},{
					text: '硕士以上',
					value: '5'
				
				}],
				educationList:[{
					text: '不限',
					value: '1'
				
				},{
					text: '高中以上',
					value: '2'
				
				},{
					text: '大专以上',
					value: '3'
				
				},{
					text: '本科以上',
					value: '4'
				
				},{
					text: '硕士以上',
					value: '5'
				
				}],
				ethnicList: [{
						"value": "01",
						"text": "汉族"
					}, {
						"value": "02",
						"text": "蒙古族"
					}, {
						"value": "03",
						"text": "回族"
					}, {
						"value": "04",
						"text": "藏族"
					}, {
						"value": "05",
						"text": "维吾尔族"
					}, {
						"value": "06",
						"text": "苗族"
					},
					{
						"value": "07",
						"text": "彝族"
					}, {
						"value": "08",
						"text": "壮族"
					}, {
						"value": "09",
						"text": "布依族"
					},
					{
						"value": "10",
						"text": "朝鲜族"
					}, {
						"value": "11",
						"text": "满族"
					}, {
						"value": "12",
						"text": "侗族"
					},
					{
						"value": "13",
						"text": "瑶族"
					}, {
						"value": "14",
						"text": "白族"
					}, {
						"value": "15",
						"text": "土家族"
					},
					{
						"value": "16",
						"text": "哈尼族"
					}, {
						"value": "17",
						"text": "哈萨克族"
					}, {
						"value": "18",
						"text": "傣族"
					},
					{
						"value": "19",
						"text": "黎族"
					}, {
						"value": "20",
						"text": "傈僳族"
					}, {
						"value": "21",
						"text": "佤族"
					},
					{
						"value": "22",
						"text": "畲族"
					}, {
						"value": "23",
						"text": "高山族"
					}, {
						"value": "24",
						"text": "拉祜族"
					},
					{
						"value": "25",
						"text": "水族"
					}, {
						"value": "26",
						"text": "东乡族"
					}, {
						"value": "27",
						"text": "纳西族"
					},
					{
						"value": "28",
						"text": "景颇族"
					}, {
						"value": "29",
						"text": "柯尔克孜族"
					}, {
						"value": "30",
						"text": "土族"
					},
					{
						"value": "31",
						"text": "达斡尔族"
					}, {
						"value": "32",
						"text": "仫佬族"
					}, {
						"value": "33",
						"text": "羌族"
					},
					{
						"value": "34",
						"text": "布朗族"
					}, {
						"value": "35",
						"text": "撒拉族"
					}, {
						"value": "36",
						"text": "毛难族"
					},
					{
						"value": "37",
						"text": "仡佬族"
					}, {
						"value": "38",
						"text": "锡伯族"
					}, {
						"value": "39",
						"text": "阿昌族"
					},
					{
						"value": "40",
						"text": "普米族"
					}, {
						"value": "41",
						"text": "塔吉克族"
					}, {
						"value": "42",
						"text": "怒族"
					},
					{
						"value": "43",
						"text": "乌孜别克族"
					}, {
						"value": "44",
						"text": "俄罗斯族"
					}, {
						"value": "45",
						"text": "鄂温克族"
					}, {
						"value": "46",
						"text": "崩龙族"
					}, {
						"value": "47",
						"text": "保安族"
					}, {
						"value": "48",
						"text": "裕固族"
					},
					{
						"value": "49",
						"text": "京族"
					}, {
						"value": "50",
						"text": "塔塔尔族"
					}, {
						"value": "51",
						"text": "独龙族"
					},
					{
						"value": "52",
						"text": "鄂伦春族"
					}, {
						"value": "53",
						"text": "赫哲族"
					}, {
						"value": "54",
						"text": "门巴族"
					},
					{
						"value": "55",
						"text": "珞巴族"
					}, {
						"value": "56",
						"text": "基诺族" 
					}
				],
				toExamine: this.$img.toExamine,
				behind: this.$img.behind,
				positive: this.$img.positive,
				userInfo: uni.getStorageSync("userInfo"),
				openid: uni.getStorageSync("openid"),
				Steps: ['基本资料', '我的信息', '择偶信息', '完成'],
				Showcamera: true,
				StepInfo: {
					Current: 0,
					Sum: 4
				},
				form: {
					sms_code: undefined,
					phoneNumber: '', 
					age: undefined,
					weight:'',
					// 昵称
					nickname: '',
					// 语音
					speech: '',
					// 个人介绍
					introduce: '',
					// 性别
					sex: undefined,
					// 生日
					// birthday: '',
					// 身高
					height: '',
					// 学校
					school: '',
					// 生活照片
					img: '',
					// 标签
					label: '',
					avatar: '',
					trade:'',
					// 封面图
					// cover_image: '',
					// 背景图
					// background_img: '',


				},


				form1: {
					// 收入
					me_income: '',
					// 是否有孩子
					me_is_only_child: "",
					// 是否有车
					me_is_have_car: '',
					// 是否有房子
					me_is_have_house: "",
					// 婚姻状态
					me_marital_status: '',
					// 何时结婚
					me_marriage_date: '',
					// 民族
					me_ethnic: "",
					// 学历
					me_qualifications:''

				},
				form2:{
					// 年龄范围
					ta_age_range:'',
					// 身高范围，
					ta_height_range:"",
					// 学历范围
					ta_min_qualifications:'',
					// 他的收入
					ta_income:'',
					// 婚姻状态
					ta_marital_status:'',
					// 是否接受小孩
					ta_is_have_child:'',
					// 住房要求
					ta_housing_requirements:'',
					// 个性
					ta_personalities:""
					
					
				},
					isOpen_idCard_authentication:uni.getStorageSync("system").isOpen_idCard_authentication,
				imgFormData: null,
				urls: [this.$img.Uploadavatar, this.$img.Uploadavatar],
				storageMode: "2",
				header: null,
				upPicUrl: null,
				img: [],
				imgStr: [],

				imgFormData1: null,
				upPicUrl1: null,
				img1: [],
				imgStr1: [],


				imgFormData2: null,
				upPicUrl2: null,
				img2: [],
				imgStr2: [],

				imgFormData3: null,
				upPicUrl3: null,
				img3: [],
				imgStr3: [],

				imgFormData4: null,
				upPicUrl4: null,
				img4: [],
				imgStr4: [],

				step: 1,

				yeartime: '',
				//选择的月份
				monthtime: '',
				//选择的天数
				daytime: '',

				date: null,


				currentTime: '1',
				// 是否认证
				isCertified: false,
				userInfoObject: {},
				count: null,
				disableCode: false,

				replace: false,
				// 定义两个对象
				 obj1 : {
				    me_income: '',
				    me_is_only_child: "",
				    me_is_have_car: '',
				    me_is_have_house: "",
				    me_marital_status: '',
				    me_marriage_date: '',
				    me_ethnic: "",
				    ta_age_range:'',
				    ta_height_range:"",
				    ta_min_qualifications:'',
				    ta_income:'',
				    ta_marital_status:'',
				    ta_is_have_child:'',
				    ta_housing_requirements:'',
				    ta_personalities:"",
				    speech: '',
				    introduce: '',
				    height: '',
				    school: '',
				    img: '',
				    label: '',
				    avatar: '',
				    trade:'',
				},
				
				 obj2: {
				    me_income: '',
				    me_is_only_child: "",
				    me_is_have_car: '',
				    me_is_have_house: "",
				    me_marital_status: '',
				    me_marriage_date: '',
				    me_ethnic: "",
				    ta_age_range:''
				}



			}
		},
		onLoad() {

			this.userInfoFn()
			this.form.avatar = this.userInfo.avatar
			this.form.nickname = this.userInfo.nickname
			
			const emptyFieldCount = this.countEmptyFields(this.obj1, this.obj2);
			console.log(emptyFieldCount)
			
			
		},

		computed: {
			startDate() {
				return this.getDate('start');
			},
			endDate() {
				return this.getDate('end');

			},

			currentTimeFn() {
				return function(currentIndex) {
					if (currentIndex == '1') {
						// 日
						return 'day';

					} else if (currentIndex == '2') {
						// 月
						return 'month';
					} else if (currentIndex == '3') {
						// 年
						return 'year';
					}
				};
			},





		},
		onShow() {
			this.$at.releaseKey('submit');
			if (uni.getStorageSync("tagsList")) {

				this.form.label = uni.getStorageSync("tagsList").join(',')


				// this.form.label = '网红,乒乓球'

			}
		},
		methods: {
			 countEmptyFields(obj1, obj2) {
			    let count = 0;
			    for (const key in obj1) {
			        if (obj1.hasOwnProperty(key) && obj2.hasOwnProperty(key)) {
			            if (obj1[key] === '' && obj2[key] === '') {
			                count++;
			            }
			        }
			    }
			    return count;
			},
			// ‘添加标签’弹出框
			addTag() {
				this.$refs.pop.show({
					anim: 'center',
					shadeClose: false,
					topclose: false
				});
			},
			// 弹窗——添加/修改单个标签
			singleLabelClick() {
				if (!this.singleLabel) {
					this.$sun.toast('请先输入标签');
				} else {
					this.updateTags();
				}
			},
			// 技师员工标签添加修改
			async updateTags() {
				// const result = await this.$http.put({
				// 	url: this.$api.updatePersonalTags,
				// 	data: {
				// 		id: '2', //修改时传值
				// 		label: this.singleLabel //添加的标签值
				// 	}
				// });
			
			
				this.$sun.toast('添加成功！');
				this.addTag2()
				this.closeTag();
			},
			
			
			// 关闭 ‘添加标签’弹出框
			closeTag() {
				this.$refs.pop.close();
			},
			subTypeFn() {
			
				this.$sun.navGo('/pagesB/index/classifyAll', {
					type: 3
				})
			},
			//删除标签
			deleteTag(item) {
				console.log(item);
				// 2种删除方式
				// this.tagDeleteList.splice(this.tagDeleteList.indexOf(item), 1);
				this.tagAddList = this.tagAddList.filter(o => {
					return o !== item;
				});
			},
			//添加标签input框回车事件
			addTag2() {
				this.tagAddList.push(this.singleLabel);
				this.form2.ta_personalities = this.tagAddList.join(",")
				this.singleLabel = '';
			},
			// ‘添加标签’弹出框
			addTag() {
				this.$refs.pop.show({
					anim: 'center',
					shadeClose: false,
					topclose: false
				});
			},
			region(e) {
				console.log(e.detail.vlaue)
				this.selsectRegion = this.regionList[e.detail.value].text
				this.form1.me_income = this.regionList[e.detail.value].value


			},
			onlyChildFn(e) {
				console.log(e.detail.vlaue)
				this.onlyChild = this.onlyChildList[e.detail.value].text
				this.form1.me_is_only_child = this.onlyChildList[e.detail.value].value
				
			},
			onlyCarFn(e) {
				console.log(e.detail.vlaue)
				this.onlyCar = this.onlyCarList[e.detail.value].text
				this.form1.me_is_have_car = this.onlyCarList[e.detail.value].value
			},
			onlyHouseFn(e) {
				console.log(e.detail.vlaue)
				this.onlyHouse = this.onlyHouseList[e.detail.value].text
				this.form1.me_is_have_house = this.onlyHouseList[e.detail.value].value
			},
			maritalStatusFn(e) {
				console.log(e.detail.vlaue)
				this.maritalStatus = this.maritalStatusList[e.detail.value].text
				this.form1.me_marital_status = this.maritalStatusList[e.detail.value].value
			},
			whenMarriedFn(e) {
				console.log(e.detail.vlaue)
				this.whenMarried = this.whenMarriedList[e.detail.value].text
				this.form1.me_marriage_date = this.whenMarriedList[e.detail.value].value
			},
			ethnicFn(e) {
				console.log(e.detail.vlaue)
				this.ethnic = this.ethnicList[e.detail.value].text
				this.form1.me_ethnic = this.ethnicList[e.detail.value].text
			},
			ageRangeFn(e){
				this.ageRange = this.ageRangeList[e.detail.value].text
				this.form2.ta_age_range = this.ageRangeList[e.detail.value].value
			},
			heightFn(e){
				this.heightRange= this.heightList[e.detail.value].text
				this.form2.ta_height_range = this.heightList[e.detail.value].value
			},
			educationeFn(e){
				this.education= this.educationList[e.detail.value].text
				this.form2.ta_min_qualifications = this.educationList[e.detail.value].value
			},
			me_educationeFn(e){
				this.me_education= this.me_educationList[e.detail.value].text
				this.form1.me_qualifications = this.me_educationList[e.detail.value].value
			},
			taMaritalStatusFn(e){
				this.taMaritalStatus= this.taMaritalStatusList[e.detail.value].text
				this.form2.ta_marital_status = this.taMaritalStatusList[e.detail.value].value
			},
			taRegionFn(e){
				
				this.taRegion= this.taRegionList[e.detail.value].text
				this.form2.ta_income = this.taRegionList[e.detail.value].value
			},
			taIsHaveChildFn(e){
				
				this.taIsHaveChild= this.taIsHaveChildList[e.detail.value].text
				this.form2.ta_is_have_child = this.taIsHaveChildList[e.detail.value].value
			},
			taOnlyHouseFn(e){
				this.taOnlyHouse= this.taOnlyHouseList[e.detail.value].text
				this.form2.ta_housing_requirements = this.taOnlyHouseList[e.detail.value].value
			},
			
			replaceFn() {
				this.replace = !this.replace
			},
			// 验证码码倒计60秒
			countDown(seconds) {
				this.count = seconds;
				var countdownTimer = setInterval(() => {
					this.count--;
					if (this.count === 0) {
						clearInterval(countdownTimer);
						this.disableCode = false;
						// 在这里可以触发验证码过期后的操作
					}
				}, 1000);
			},
			// 注册获取验证码
			async getVerificationCode() {
				if (!this.disableCode) {

					if (/^1[3456789]\d{9}$/.test(this.form.phoneNumber)) {
						const result = await this.$http.post({
							url: this.$api.sendSmsRequest,
							data: {

								phone: this.form.phoneNumber
							}
						});

						if (result.code == 0) {

							this.disableCode = true;
							this.countDown(60);
						} else {
							this.$sun.toast(result.message, 'none');
						}

					} else {
						this.$sun.toast('请填写正确的手机号', 'none');
					}
				}
			},
			radioChange(e) {

				console.log(e)
				this.form.sex = e.detail.value

			},
			cancel() {
				setTimeout(() => {
					this.$refs.modifyEmployeeInfo.close()
				}, 500)

			},
			chooseImage(filePath) {
				console.log('选择的相册图片: ' + filePath);
			},
			confirmPhoto(filePath) {
				this.Showcamera = false

				uni.uploadFile({
					url: this.$api.upload,
					filePath: filePath,
					name: 'file',

					header: null,
					success: uploadRes => {
						console.log('uploadRes-------------',
							uploadRes, 'this.formData', this
							.formData,
							'this.uploadServerUrl', this
							.uploadServerUrl);
						/* 阿里云上传 */


						/* 七牛云上传 */
						uploadRes = JSON.parse(uploadRes.data);

						if (uploadRes.code != 0) {
							// console.log('进入失败uploadRes', uploadRes);
							uni.showToast({
								title: '上传失败 : ' +
									uploadRes.data,
								icon: 'none'
							});
							this.error(index);
						} else {
							this.form1.authentication_img = uploadRes.data.url

							this.$emit('confirm', this.voicePath)
						}

					},
					fail: e => {
						uni.showToast({
							title: '上传照片失败',
							icon: 'none'
						});
						this.error('上传照片失败');
					}
				});
				console.log('拍摄的图片: ' + filePath, this.Showcamera);
			},
			voiceRecordingFn() {

				this.$refs.modifyEmployeeInfo.show({
					anim: 'bottom',
					position: 'bottom',
					shadeClose: false, //false使用户不能点击其它关闭页面
					topclose: false,
					zIndex: 1000

				});
				// this.$sun.navGo('/pagesA/personalCenter/voiceRecording')

			},
			confirm(e) {
				if (e) {
					this.$sun.toast('语音上传成功', 'none')
					this.form.speech = e
					setTimeout(() => {
						this.$refs.modifyEmployeeInfo.close()
					}, 100)
				} else {
					this.$sun.toast('语音上传失败', 'none')

					setTimeout(() => {
						this.$refs.modifyEmployeeInfo.close()
					}, 100)
				}
			},
			async userInfoFn() {
				const result = await this.$http.post({
					url: this.$api.userInfo,
					data: {




					},
					headers: {
						'Authorization': this.userInfo.token
					}

				})

				if (result.code == 0) {
					wx.setStorageSync('userInfo', result.data);
					console.log('data', result.data);
					this.userInfoObject = result.data
					this.form.phoneNumber = this.userInfoObject.phone
					if (this.userInfoObject.is_authentication == 1 || this.userInfoObject.is_authentication == 3) {
						this.step = 4
						this.StepInfo.Current = 100
						this.urls[0] = this.userInfoObject.avatar


					} else if (this.userInfoObject.is_authentication == 2) {
						this.step = 4
						this.StepInfo.Current = 100
						this.urls[0] = this.userInfoObject.avatar
					}




				}
			},
			returnHomepageFn() {
				this.$sun.navBack()
			},
			clk(index) {
				this.$refs.avatar.fChooseImg(index, {
					selWidth: "300upx",
					selHeight: "300upx",
					expWidth: '260upx',
					expHeight: '260upx'
				});
			},
			AddTagsFn(label = '') {
				console.log(label)
				this.$sun.navGo('/pagesA/personalCenter/characteristicLabels', {
					itemLabel: label
				})
			},
			// 日期获取
			getDate(type) {
				const date = new Date();
				let year = date.getFullYear();
				let month = date.getMonth() + 1;
				let day = date.getDate();
				if (type === 'start') {
					year = year - 60;
				} else if (type === 'end') {
					year = year + 2;
				}
				month = month > 9 ? month : '0' + month;
				day = day > 9 ? day : '0' + day;

				return `${year}-${month}-${day}`;

			},

			bindDateChange(e) {


				this.createTime = e.detail.value
				console.log(e.detail.value)
				this.form.birthday = e.detail.value
				this.date = e.target.value;
				/* 在上面声明变量，split是用来截取字段*/
				this.yeartime = this.date.split('-')[0];
				this.monthtime = this.date.split('-')[1];
				this.daytime = this.date.split('-')[2];


			},
			// 上传图片返回
			imgLoaded(e) {
				console.log(e)

				this.img = [];
				for (let i = 0; i < e.length; i++) {
					this.img.push(e[i].url);
				}


				this.imgStr = this.img

				this.form.img = this.imgStr.length === 1 ? this.imgStr[0].toString() : this.imgStr
					.join(',');
			},
			imgsChange(file) {

				console.log('上传发生改变this.storageMode1111============', this.storageMode, '参数file', file);


				if (file.length) {
					this.upPicUrl = this.$api.upload;
					let filesNmae = 'nmoBackground_01.png'; // this.timeDate + 'png'
					this.imgFormData = {
						file: file,
						getsize: file.size,
						getContentType: ['image/png', 'image/jpeg'],
						getoriginalfilename: filesNmae,
						getName: filesNmae
					};
					this.$nextTick(() => {
						this.$refs.selectimgandupload.upload(); //图片上传
					});
				} else {
					this.form.img = '',
						this.imgStr = []
				}
				// this.niuyunLoop(file,0)

			},

			// 上传图片返回
			imgLoaded1(e) {
				console.log(e)

				this.img1 = [];
				for (let i = 0; i < e.length; i++) {
					this.img1.push(e[i].url);
				}


				this.imgStr1 = this.img1

				this.form1.id_card_front = this.imgStr1.length === 1 ? this.imgStr1[0].toString() : this.imgStr1
					.join(',');
			},
			imgsChange1(file) {




				if (file.length) {
					this.upPicUrl1 = this.$api.upload;
					let filesNmae = 'nmoBackground_01.png'; // this.timeDate + 'png'
					this.imgFormData1 = {
						file: file,
						getsize: file.size,
						getContentType: ['image/png', 'image/jpeg'],
						getoriginalfilename: filesNmae,
						getName: filesNmae
					};
					this.$nextTick(() => {
						this.$refs.selectimgandupload1.upload(); //图片上传
					});
				} else {
					this.form1.id_card_front = '',
						this.imgStr1 = []
				}
				// this.niuyunLoop(file,0)

			},



			// 上传图片返回
			imgLoaded2(e) {
				console.log(e)

				this.img2 = [];
				for (let i = 0; i < e.length; i++) {
					this.img2.push(e[i].url);
				}


				this.imgStr2 = this.img2

				this.form1.id_card_back = this.imgStr2.length === 1 ? this.imgStr2[0].toString() : this.imgStr2
					.join(',');
			},
			imgsChange2(file) {




				if (file.length) {
					this.upPicUrl2 = this.$api.upload;
					let filesNmae = 'nmoBackground_01.png'; // this.timeDate + 'png'
					this.imgFormData2 = {
						file: file,
						getsize: file.size,
						getContentType: ['image/png', 'image/jpeg'],
						getoriginalfilename: filesNmae,
						getName: filesNmae
					};
					this.$nextTick(() => {
						this.$refs.selectimgandupload2.upload(); //图片上传
					});
				} else {
					this.form1.id_card_back = '',
						this.imgStr2 = []
				}
				// this.niuyunLoop(file,0)

			},
			// 上传图片返回
			imgLoaded3(e) {
				console.log(e)

				this.img3 = [];
				for (let i = 0; i < e.length; i++) {
					this.img3.push(e[i].url);
				}


				this.imgStr3 = this.img3

				this.form.cover_image = this.imgStr3.length === 1 ? this.imgStr3[0].toString() : this.imgStr3
					.join(',');
			},
			imgsChange3(file) {




				if (file.length) {
					this.upPicUrl3 = this.$api.upload;
					let filesNmae = 'nmoBackground_01.png'; // this.timeDate + 'png'
					this.imgFormData3 = {
						file: file,
						getsize: file.size,
						getContentType: ['image/png', 'image/jpeg'],
						getoriginalfilename: filesNmae,
						getName: filesNmae
					};
					this.$nextTick(() => {
						this.$refs.selectimgandupload3.upload(); //图片上传
					});
				} else {
					this.form.cover_image = '',
						this.imgStr3 = []
				}
				// this.niuyunLoop(file,0)

			},
			// 上传图片返回
			imgLoaded4(e) {
				console.log(e)

				this.img4 = [];
				for (let i = 0; i < e.length; i++) {
					this.img4.push(e[i].url);
				}


				this.imgStr4 = this.img4

				this.form.background_img = this.imgStr4.length === 1 ? this.imgStr4[0].toString() : this.imgStr4
					.join(',');
			},
			imgsChange4(file) {




				if (file.length) {
					this.upPicUrl4 = this.$api.upload;
					let filesNmae = 'nmoBackground_01.png'; // this.timeDate + 'png'
					this.imgFormData4 = {
						file: file,
						getsize: file.size,
						getContentType: ['image/png', 'image/jpeg'],
						getoriginalfilename: filesNmae,
						getName: filesNmae
					};
					this.$nextTick(() => {
						this.$refs.selectimgandupload4.upload(); //图片上传
					});
				} else {
					this.form.background_img = '',
						this.imgStr4 = []
				}
				// this.niuyunLoop(file,0)

			},
			nextFn(index) {

				this.$at.uniDoFunc({
					key: 'submit',
					success: async () => {
						this.$at.lockKey('submit');
						if (this.step == 1) {
							console.log(this.form)
							// 登录 需要进行判断当前账号密码 和账号归属店铺及角色是否又选择
							if (!this.form.nickname) {
								this.$sun.toast("请填写昵称", 'none')
								this.$at.releaseKey('submit');
							} else if (!this.form.avatar) {
								this.$sun.toast("请上传头像", 'none')
								this.$at.releaseKey('submit');
							}
							else if (!this.form.age&&(!Number(this.isOpen_idCard_authentication))) {
								this.$sun.toast("请选择你的年龄", 'none')
								this.$at.releaseKey('submit');
							}
							else if (!this.form.sex&&(!Number(this.isOpen_idCard_authentication))) {
								this.$sun.toast("请选择你的性别", 'none')
								this.$at.releaseKey('submit');
							}
							else if (!this.form.phoneNumber) {
								this.$sun.toast("请填写你的手机号", 'none')
								this.$at.releaseKey('submit');
							} else if (!this.form.sms_code && ((!this.userInfo.phone) || this.replace)) {
								this.$sun.toast("请填写你的验证码", 'none')
								this.$at.releaseKey('submit');
							} else if (!this.form.introduce) {
								this.$sun.toast("请填写个人介绍", 'none')
								this.$at.releaseKey('submit');
							}  else if (!this.form.height) {
								this.$sun.toast("请填写你的身高", 'none')
								this.$at.releaseKey('submit');
							} else if (!this.form.school) {
								this.$sun.toast("请输入你的学校", 'none')
								this.$at.releaseKey('submit');
							}
							// else if (!this.form.img) {
							// 	this.$sun.toast("请上传生活照片", 'none')
							// 	this.$at.releaseKey('submit');
							// } 
							else {
								this.step = index


								if (this.step == 2) {
									// this.$set(this.StepInfo, 'Current',JSON.parse(JSON.stringify(33.4)));
									this.StepInfo.Current = JSON.parse(JSON.stringify(33.4))


									console.log(this.StepInfo)
								} else if (this.step == 3) {
									this.StepInfo.Current = 66.7
								} else if (this.step == 4) {
									this.StepInfo.Current = 100
								}


								// const result = await this.$http.post({
								// 	url: this.$api.authentication,
								// 	data: {
								// 		...this.form

								// 	},
								// 	headers: {
								// 		'Authorization': this.userInfo.token
								// 	}

								// })
								// if (result.code == 0) {

								// 	this.$sun.toast(result.message, 'none')

								// 	uni.removeStorageSync('tagsList')



								// 	// 如果是认证完成
								// 	console.log(this.form1)
								// 	this.step = index
								// 	if (this.step == 2) {
								// 		this.StepInfo.Current = 33.4
								// 	} else if (this.step == 3) {
								// 		this.StepInfo.Current = 66.7
								// 	} else if (this.step == 4) {
								// 		this.StepInfo.Current = 100

								// 		this.userInfoFn()
								// 	}





								// } else {
								// 	this.$sun.toast(result.message, 'none')
								// }

								this.$at.releaseKey('submit');
							}
						} else if (this.step == 2) {

							// 登录 需要进行判断当前账号密码 和账号归属店铺及角色是否又选择
							console.log(this.form1)
							this.step = index
							if (this.step == 2) {
								this.StepInfo.Current = 33.4
							} else if (this.step == 3) {
								this.StepInfo.Current = 66.7
							} else if (this.step == 4) {
								this.StepInfo.Current = 100
							}

							this.$at.releaseKey('submit');
						} else if (this.step == 3) {
							// 如果是开始认证
						
								this.$at.releaseKey('submit');
								const formAll = {
									...this.form,
									...this.form1,
									...this.form2
								}


								console.log(formAll)

								const result = await this.$http.post({
									url: this.$api.authentication,
									data: {
										...formAll

									},
									headers: {
										'Authorization': this.userInfo.token
									}

								})
								if (result.code == 0) {

									this.$sun.toast(result.message, 'none')

									uni.removeStorageSync('tagsList')



									// 如果是认证完成
									console.log(this.form1)
									this.step = index
									if (this.step == 2) {
										this.StepInfo.Current = 33.4
									} else if (this.step == 3) {
										this.StepInfo.Current = 66.7
									} else if (this.step == 4) {
										this.StepInfo.Current = 100

										this.userInfoFn()
									}





								} else {
									this.$sun.toast(result.message, 'none')
								}


							



						}
					}
				});





			},
			// 检测函数
			msgSecCheck(label) {
				if (label == 10001) {
					uni.showModal({
						title: '提示',
						content: '输入的内容涉及敏感内容，请检查后重新输入(广告)',
						success: async (res) => {
							if (res.confirm) {


							} else if (res.cancel) {

							}
						}
					});
				} else if (label == 20001) {
					uni.showModal({
						title: '提示',
						content: '输入的内容涉及敏感内容，请检查后重新输入(时政)',
						success: async (res) => {
							if (res.confirm) {


							} else if (res.cancel) {

							}
						}
					});
				} else if (label == 20002) {
					uni.showModal({
						title: '提示',
						content: '输入的内容涉及敏感内容，请检查后重新输入(色情)',
						success: async (res) => {
							if (res.confirm) {


							} else if (res.cancel) {

							}
						}
					});
				} else if (label == 20003) {
					uni.showModal({
						title: '提示',
						content: '输入的内容涉及敏感内容，请检查后重新输入(辱骂)',
						success: async (res) => {
							if (res.confirm) {


							} else if (res.cancel) {

							}
						}
					});
				} else if (label == 20006) {
					uni.showModal({
						title: '提示',
						content: '输入的内容涉及敏感内容，请检查后重新输入(违法犯罪)',
						success: async (res) => {
							if (res.confirm) {


							} else if (res.cancel) {

							}
						}
					});
				} else if (label == 20008) {
					uni.showModal({
						title: '提示',
						content: '输入的内容涉及敏感内容，请检查后重新输入(欺诈)',
						success: async (res) => {
							if (res.confirm) {


							} else if (res.cancel) {

							}
						}
					});
				} else if (label == 20012) {
					uni.showModal({
						title: '提示',
						content: '输入的内容涉及敏感内容，请检查后重新输入(低俗)',
						success: async (res) => {
							if (res.confirm) {


							} else if (res.cancel) {

							}
						}
					});
				} else if (label == 20013) {
					uni.showModal({
						title: '提示',
						content: '输入的内容涉及敏感内容，请检查后重新输入(版权)',
						success: async (res) => {
							if (res.confirm) {


							} else if (res.cancel) {

							}
						}
					});
				} else if (label == 21000) {
					uni.showModal({
						title: '提示',
						content: '输入的内容涉及敏感内容，请检查后重新输入(其他)',
						success: async (res) => {
							if (res.confirm) {


							} else if (res.cancel) {

							}
						}
					});
				} else if (label == 100) {
					return 'pass'
				}

			},
			async myUpload(rsp) {
				this.$set(this.urls, rsp.index, rsp.path);
				console.log(rsp)
				this.avatarObj = rsp
				if (this.storageMode == 2) {
					uni.uploadFile({
						url: this.$api.upload, //仅为示例，非真实的接口地址
						filePath: this.avatarObj.path,
						name: 'file',
						formData: {

						},
						success: (res) => {
							if (res.statusCode == 200) {
								console.log('uploadImage success, res is:', res)
								uni.hideLoading();
								uni.showToast({
									title: '上传成功',
									icon: 'success',
									duration: 1000
								})
								this.upLoadStatus = '上传成功'
								this.form.avatar = JSON.parse(res.data).data.url
								console.log(this.form.avatar)
							}



						},
						fail: (err) => {
							if (this.pageVisible) {
								console.log('uploadImage fail', err);
								uni.hideLoading();
								uni.showModal({
									content: err.errMsg,
									showCancel: false
								});
							}
						},
					});
				} else {
					const ts = new Date().getTime();
					// const ua = navigator.userAgent;
					const us = {
						ts,
						// ua
					};
					let url = 'https://yjykmaster.admin168.net/door-massage/massage/upload/alyOssSignature' +
						`${object2Url(us)}`;
					const res = await this.$http.get({
						url: url,
						data: {
							us: us
						}
					});

					let markIndex = this.avatarObj.path.lastIndexOf('.');
					let suffix = this.avatarObj.path.substring(markIndex);
					let date = new Date().getTime();
					wx.uploadFile({
						url: res.data.host, //上传的路径
						filePath: this.avatarObj.path,
						name: 'file',
						formData: {
							name: this.avatarObj.path,
							key: date + suffix, //上传图片的名字和路径（默认路径根目录，自定义目录：xxx/xxx.png）
							policy: res.data.policy,
							OSSAccessKeyId: res.data.accessId,
							success_action_status: "200",
							signature: res.data.signature,
						},
						header: {
							'Access-Control-Allow-Origin': '*',
							'x-oss-callback-Authorization': 'access_token'
						},
						success: (result) => {
							console.log('chooseImage success, temp path is: ', res)

							let url = res.data.host + '/' + date + suffix;
							console.log(url)

							this.form.avatar = url
							if (url) {
								this.upLoadStatus = '上传成功'
							}
							wx.showToast({
								title: "上传成功",
								icon: 'success',
								duration: 1000
							})

						},
						fail: function({
							errMsg
						}) {
							console.log('upladImage fail, errMsg is: ', errMsg)
							wx.showToast({
								title: "上传失败",
								duration: 1000
							})
						},
					})

				}
			},
			preFn(index, name) {
				if (name == 'reCertification') {
					this.$sun.assignObject(this.form, {
						...this.userInfoObject
					})
					this.$sun.assignObject(this.form1, {
						...this.userInfoObject
					})
					this.$sun.assignObject(this.form2, {
						...this.userInfoObject
					})
					this.form.phoneNumber = this.userInfoObject.phone
				
					
					this.selsectRegion= this.form1.me_income ?this.taRegionList[Number(this.form1.me_income)-1].text :'请选择工资收入'
					this.onlyChild= this.form1.me_is_only_child ?this.onlyChildList[Number( this.form1.me_is_only_child)-1].text:'是否是独生子女'
					this.onlyCar= this.form1.me_is_have_car ?this.onlyCarList[Number(this.form1.me_is_have_car)-1].text :'是否有车'
					this.onlyHouse=this.form1.me_is_have_house? this.onlyHouseList[Number(this.form1.me_is_have_house)-1].text :'是否有房'
					this.me_education=this.form1.me_qualifications?this.me_educationList[Number(this.form1.me_qualifications)-1].text :'请选择学历'
					this.maritalStatus=this.form1.me_marital_status? this.maritalStatusList[Number(this.form1.me_marital_status)-1].text :'请选择婚姻状态'
					this.whenMarried=this.form1.me_marriage_date? this.whenMarriedList[Number( this.form1.me_marriage_date)-1].text :'请选择何时结婚'
					this.ethnic=this.form1.me_ethnic?this.form1.me_ethnic:'请选择民族'
					
					
					this.ageRange=this.form2.ta_age_range?this.ageRangeList[Number(this.form2.ta_age_range)-1].text :'请选择年龄范围'
					this.heightRange=this.form2.ta_height_range? this.heightList[Number( this.form2.ta_height_range)-1].text:'请选择最低身高'
					this.education=this.form2.ta_min_qualifications?this.educationList[Number(this.form2.ta_min_qualifications)-1].text :'请选择学历'
					this.taRegion=this.form2.ta_income? this.taRegionList[Number( this.form2.ta_income)-1].text :'请选择收入范围'
					this.taIsHaveChild=this.form2.ta_is_have_child? this.taIsHaveChildList[Number(this.form2.ta_is_have_child)-1].text :'是否接受小孩'
					this.taOnlyHouse=this.form2.ta_housing_requirements?this.taOnlyHouseList[Number(this.form2.ta_housing_requirements)-1].text:'请选择住房要求'
					this.taMaritalStatus=this.form2.ta_marital_status?this.taMaritalStatusList[Number(this.form2.ta_marital_status)-1].text:'请选择婚姻状态'
					
					if(this.form2.ta_personalities){
						this.tagAddList = this.form2.ta_personalities.split(',')
					}
					// const time = this.form.birthday.split('-')
					// console.log(time)
					// this.yeartime = time[0],
					// 	this.monthtime = time[1],
					// 	this.daytime = time[2]
					this.form.avatar = this.userInfoObject.avatar
					
					
					console.log(this.form,this.form1,this.form2)
					
					
					this.$nextTick(() => {
						const img = this.form.img.split(',').map((item) => item.trim());
						console.log(img)
						if (!(img[0] == '')) {
							this.$refs.selectimgandupload.setItems(img);
						}

						// 					const cover_imgList = this.form.cover_image.split(',').map((item) => item.trim());
						// 					console.log(cover_imgList)
						// 					if(!(cover_imgList[0]=='')){
						// 						this.$refs.selectimgandupload3.setItems(cover_imgList);
						// 					}


						// 					const background_img = this.form.background_img.split(',').map((item) => item.trim());
						// 					console.log(background_img)
						// 					if(!(background_img[0]=='')){
						// 						this.$refs.selectimgandupload4.setItems(background_img);
						// 					}

						// this.$nextTick(() => {
						// 	const cover_imgList = this.form1.id_card_front.split(',').map((item) => item
						// 		.trim());
						// 	console.log(cover_imgList)
						// 	this.$refs.selectimgandupload1.setItems(cover_imgList);


						// })
						// this.$nextTick(() => {
						// 	const cover_imgList = this.form1.id_card_back.split(',').map((item) => item
						// 		.trim());
						// 	console.log(cover_imgList)
						// 	this.$refs.selectimgandupload2.setItems(cover_imgList);


						// })
					})
				}


				if (index == 1) {

					this.$nextTick(() => {
						const img = this.form.img.split(',').map((item) => item.trim());
						console.log(img)
						if (!(img[0] == '')) {
							this.$refs.selectimgandupload.setItems(img);
						}

						// const cover_imgList = this.form.cover_image.split(',').map((item) => item.trim());
						// console.log(cover_imgList)
						// if(!(cover_imgList[0]=='')){
						// 	this.$refs.selectimgandupload3.setItems(cover_imgList);
						// }

						// const background_img = this.form.background_img.split(',').map((item) => item.trim());
						// console.log(background_img)
						// if(!(background_img[0]=='')){
						// 	this.$refs.selectimgandupload4.setItems(background_img);
						// }
					})


				} else if (index == 2) {
					this.$nextTick(() => {
						const cover_imgList = this.form1.id_card_front.split(',').map((item) => item.trim());
						console.log(cover_imgList)
						this.$refs.selectimgandupload1.setItems(cover_imgList);


					})
					this.$nextTick(() => {
						const cover_imgList = this.form1.id_card_back.split(',').map((item) => item.trim());
						console.log(cover_imgList)
						this.$refs.selectimgandupload2.setItems(cover_imgList);


					})
				}


				this.step = index
				if (this.step == 2) {
					this.StepInfo.Current = 33.4
				} else if (this.step == 3) {
					this.Showcamera = true
					this.isCertified = false
					this.StepInfo.Current = 66.7
				} else if (this.step == 4) {
					this.StepInfo.Current = 100
				} else if (this.step == 1) {
					this.StepInfo.Current = 0
				}
			}


		}
	}
</script>

<style lang="less" scoped>
	/deep/.sunui-add-list-remove {
		z-index: 99;
	}

	.bgIndex {


		background-repeat: no-repeat;
		background-size: cover;
		background-image: url('http://yunhunjian123.oss-cn-shanghai.aliyuncs.com/2024-06-17/1f112202406171131397312.png');

		height: 118px;



	}

	.borderTwo {

		border-top: 2rpx solid rgb(236, 235, 235);
	}
   
    
	.certificationInformation {
		position: relative;
		margin-top: -20rpx;

		border-radius: 15px;

		background: rgb(255, 255, 255);

		.avatar {
			width: 160rpx;
			height: 160rpx;
			position: absolute;
			left: 30rpx;
			top: -60rpx;
		}
       .personalTags {
       	margin: 36rpx 0;
       
       	.tag_container {
       		margin-top: 36rpx;
       		display: flex;
       		align-items: center;
       		flex-direction: row;
       		// justify-content: space-between;
       		flex-wrap: wrap;
       	}
       
       	.zy_tag_add {
       		width: 150rpx;
       
       		height: 50rpx; //medium：45rpx；small：40rpx；mini：35rpx
       		padding: 5rpx 15rpx;
       		margin: 5rpx 8rpx;
       		border: 2rpx solid rgb(237, 237, 237);
       		border-radius: 10rpx;
       		text-align: center;
       	}
       }
		.identityAuthentication {
			.card {
				width: 708rpx;

				border-radius: 20rpx;
				background: #FFF;
				margin-left: 20rpx;
				padding: 22rpx;
				box-sizing: border-box;

				.header {
					.avaterTitle {
						color: #000;
						font-weight: 600;
						font-size: 32rpx;

					}

					.headerText {
						font-size: 28rpx;
						margin: 15rpx 0 25rpx 0;

					}
				}

				.illustrate {
					margin-top: 24rpx;
					color: #666;
					font-size: 24rpx;
				}

				.nationalEmblem {
					margin: 36rpx 0 24rpx 0;
					position: relative;

					.upLoad {
						z-index: 999;
						position: absolute;
						top: 50%;
						left: 50%;
						transform: translate(-50%, -50%);

						.photo {


							width: 86rpx;
							height: 86rpx;

						}

						.marginTop15 {
							margin-top: 15rpx;
							font-size: 16px;
						}
					}

					.avater {
						width: 682rpx;
						height: 338rpx;
					}
				}

				.facade {
					position: relative;

					.avater {
						width: 682rpx;
						height: 338rpx;
					}

					.upLoad {
						z-index: 999;
						position: absolute;
						top: 50%;
						left: 50%;
						transform: translate(-50%, -50%);

						.photo {


							width: 86rpx;
							height: 86rpx;

						}

						.marginTop15 {
							margin-top: 15rpx;
							font-size: 16px;
						}
					}
				}



			}

			button {
				display: inline-flex !important;
				align-items: center;
				justify-content: center;
				height: 70rpx;
				line-height: 1;
				vertical-align: middle;
				-webkit-appearance: none;
				-webkit-text-size-adjust: 100%;
				box-sizing: border-box;
				font-size: 32rpx;
				white-space: nowrap;
				margin: 0;
				padding: 0rpx 120rpx;
				overflow: visible;
				border-radius: 10rpx;
				font-weight: bold;
				margin: auto;
			}

			.logins {
				width: 708rpx;
				margin-left: 20rpx;
				height: 100rpx;
				color: #fff;
				border-radius: 10px;
				background-color: #1890FF;
			}



		}
	}
	// “添加标签” 弹出框
	.v-pop-cls {
		padding: 46rpx 0 88rpx;
		width: 710rpx;
		height: auto;
		position: relative;
		border-radius: 20rpx;
		background: #fff;
	
		image {
			width: 52rpx;
			height: 52rpx;
			position: absolute;
			padding: 30rpx;
			top: 0rpx;
			right: 0rpx;
		}
	
		text {
			color: #000;
			font-size: 36rpx;
		}
	
		input {
			// text-align: center;
			padding: 0 20rpx;
			width: 608rpx;
			height: 94rpx;
			margin: 62rpx 0;
			border-radius: 20rpx;
			background: #f5f5f5;
		}
	
		.add {
			width: 638rpx;
			height: 88rpx;
			background: #1890ff;
			color: #fff;
			font-size: 32rpx;
		}
	}

	.myNmae {
		position: relative;

		.verificationCode {
			z-index: 555;
			// position: absolute;
			right: 0;
			text-align: center;
			width: 170rpx;
			height: 65rpx;
			line-height: 65rpx;
			border-radius: 100rpx;
			font-size: 20rpx;
			background: #7D5CF7;
			color: #fff;
		}

		background-color: #fff;
		min-width: 50rpx;

		.avatar {
			width: 84rpx;
			height: 84rpx;
		}

		input {
			text-align: left;
		}

		.uni-input {
			margin-right: 140rpx;
		}

		.uni-inputs {
			text-align: left !important;
		}

		.backgroundImg {

			height: 154rpx;


		}

	}

	.next {
		margin-top: 25rpx;
		height: 104rpx;
		border-radius: 200rpx;
		color: #fff;
		background: linear-gradient(253.79deg, rgb(234, 80, 235) 14.067%, rgb(136, 42, 243) 99.721%);
	}

	.pre {
		margin-top: 25rpx;
		height: 104rpx;
		border-radius: 200rpx;
		width: 100%;
		color: #fff;
		background: linear-gradient(253.79deg, rgb(0, 0, 255) 14.067%, rgb(136, 42, 243) 99.721%);
	}

	.higeys {
		height: 100rpx;
		line-height: 100rpx;
	}

	.voiceIntroduction {

		height: 76rpx;
		box-sizing: border-box;
		border: 2rpx dashed rgb(210, 176, 255);
		border-radius: 20rpx;
		color: #6C02FA;
		background: rgb(255, 255, 255);
	}
</style>